﻿Imports CustomTshirtFinal

Public Class PedidoNuevo
    Inherits System.Web.UI.Page
    Protected Sub btnGuardar_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnGuardar.Click

        Try
            Dim negocio = New PedidoNegocio
            negocio.insertar(Me.txtIdUsuario.Text, Me.txtFecha.Text, Me.txtEstado.Text, Me.txtTotal.Text)

            Me.txtIdUsuario.Text = ""
            Me.txtFecha.Text = ""
            Me.txtEstado.Text = ""
            Me.txtTotal.Text = ""

            Response.Write("Se insertó correctamente")

        Catch ex As Exception
            Response.Write("Problemas al insertar")
        End Try

    End Sub

    Protected Sub btnRegresar_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnRegresar.Click
        Response.Redirect("Pedidos.aspx", True)
    End Sub
End Class